package poker;

import static org.junit.Assert.*;

import org.junit.Before;
import org.junit.Test;

public class CardTest {
  private int ace = 1, king = 13, heart = 1, space = 2;
  private Card aceheart, acespade, kingheart, kingspade;

  @Before
  public void setUp()  {
    aceheart = new Card(heart ,ace);
	kingheart = new Card(heart,king);
	acespade = new Card(space, ace);
	kingspade = new Card(space, king);
  }

  @Test
  public void test() {
	temp = "Ace of hearts";
	assertEquals(aceheart.toString(), temp );
	assertSame(aceheart, aceheart);
	assertNotSame(aceheart, temp);
	assertNotSame(aceheart, acespade);
	assertNotSame(aceheart, kingheart);
	assertNotSame(aceheart, kingspade);
	assertSame(aceheart.getRank(), acespade.getRank());
	assertNotSame(aceheart.getRank(), kingspade.getRank());
	assertSame(aceheart.getSuit(), kingheart.getSuit());
	assertNotSame(aceheart.getSuit(), acespade.getSuit());
  }

}
